package com.lmx.repoDomain.repository;

import com.lmx.persistence.service.RegisterService;
import com.lmx.persistence.service.TenantService;
import com.lmx.repoDomain.tmodel.DeleteTeantPrivilege;
import com.lmx.repoDomain.tmodel.TenantPrivilege;

import io.katharsis.queryParams.QueryParams;
import io.katharsis.repository.annotations.JsonApiFindAll;
import io.katharsis.repository.annotations.JsonApiResourceRepository;
import io.katharsis.repository.annotations.JsonApiSave;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JsonApiResourceRepository(DeleteTeantPrivilege.class)
@Component
public class DeleteTeantPrivilegeRepository extends BaseRepository<DeleteTeantPrivilege> {
	@Autowired
	private TenantService tenantService;

	@Override
	@JsonApiSave
	public DeleteTeantPrivilege save(DeleteTeantPrivilege tp) {
		tenantService.deleteTenantPrivilege(Long.parseLong(tp.getTenantId()));
		return null;
	}

}
